<!doctype html>
<html lang="zh-CN">

<head>
  <meta charset="utf-8">
  <meta name="renderer" content="webkit">
  <!-- 指定网页的兼容性模式设置。IE = edge告诉IE使用最新的引擎渲染网页 -->
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title><%= webConfig.title%></title>
  <meta name="keywords" content="<%= webConfig.keywords%>">
  <meta name="description" content="<%= webConfig.description%>">
  <link rel="stylesheet" type="text/css" href="public/home/css/bootstrap.min.css">
  <link rel="stylesheet" type="text/css" href="public/home/css/nprogress.css">
  <link rel="stylesheet" type="text/css" href="public/home/css/style.css">
  <link rel="stylesheet" type="text/css" href="public/home/css/font-awesome.min.css">
  <link rel="apple-touch-icon-precomposed" href="public/home/images/icon/icon.png">
  <link rel="shortcut icon" href="public/home/images/icon/favicon.ico">
  <script src="public/home/js/jquery-2.1.4.min.js"></script>
  <script src="public/home/js/nprogress.js"></script>
  <script src="public/home/js/jquery.lazyload.min.js"></script>
  <script src="public/admin/js/pintuer.js"></script>
  <!--[if gte IE 9]>
  <script src="public/home/js/jquery-1.11.1.min.js" type="text/javascript"></script>
  <script src="public/home/js/html5shiv.min.js" type="text/javascript"></script>
  <script src="public/home/js/respond.min.js" type="text/javascript"></script>
  <script src="public/home/js/selectivizr-min.js" type="text/javascript"></script>
<![endif]-->
  <!--[if lt IE 9]>
  <script>window.location.href='upgrade-browser.html';</script>
<![endif]-->
</head>

<body class="user-select">
  <% include common/head.html %>
  <section class="container">
    <div class="content-wrap">
      <div class="content">
        <div class="jumbotron">
          <h1>欢迎访问黄绍模博客</h1>
          <p>在这里可以看到前端技术，后端程序，网站内容管理系统等文章，还有我的程序人生！</p>
        </div>
        <!-- 轮播图展示区 -->
        <div id="focusslide" class="carousel slide" data-ride="carousel">
          <ol class="carousel-indicators">
            <% sliderData.forEach((item,key)=>{%>
            <% if(key == 0){%>
            <li data-target="#focusslide" data-slide-to="0" class="active"></li>
            <% }else{%>
            <li data-target="#focusslide" data-slide-to="<%= key%>"></li>
            <% }%>
            <% }) %>
          </ol>
          <div class="carousel-inner" role="listbox">
            <% sliderData.forEach((item,key)=>{%>
            <% if(key == 0){%>
            <div class="item active">
              <% }else{%>
              <div class="item ">
                <% }%>
                <a href="<%= item.url%>" target="_blank"><img src="<%= item.img%>" alt="" class="img-responsive">
                </a>
              </div>
              <% }) %>
            </div>
            <a class="left carousel-control" href="#focusslide" role="button" data-slide="prev" rel="nofollow"> <span
                class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> <span class="sr-only">上一个</span>
            </a>
            <a class="right carousel-control" href="#focusslide" role="button" data-slide="next" rel="nofollow"> <span
                class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> <span class="sr-only">下一个</span>
            </a>
          </div>
          <article class="excerpt-minic excerpt-minic-index">
            <h2><span class="red">【今日推荐】</span><a href="" title="">从下载看我们该如何做事</a></h2>
            <p class="note">一次我下载几部电影，发现如果同时下载多部要等上几个小时，然后我把最想看的做个先后排序，去设置同时只能下载一部，结果是不到一杯茶功夫我就能看到最想看的电影。
              这就像我们一段时间内想干成很多事情，是同时干还是有选择有顺序的干，结果很不一样。同时...</p>
          </article>
          <!-- 最新文章展示区 -->
          <!-- <form action="/uploadup" method="post" enctype="multipart/form-data">
            <h2>单图上传</h2>
            <input type="file" name="logo">
            <input type="submit" value="提交">
        </form> -->
          <div class="title">
            <h3>最新发布</h3>
            <!-- <div class="more"><a href="">PHP</a><a href="">JavaScript</a><a href="">EmpireCMS</a><a href="">Apache</a><a href="">MySQL</a></div> -->
          </div>
          <% newsData.forEach(item=>{%>
          <article class="excerpt excerpt-1">
            <a class="focus" href="/news?id=<%= item.id%>" title="" onclick="addNum(`<%= item.id%>`)" ><img class="thumb"  src="<%= item.img%>" alt=""></a>
            <header><a class="cat" href="program"><%= item.tname%><i></i></a>
              <h2><a href="/news?id=<%= item.id%>" title="标题" onclick="addNum(`<%= item.id%>`)"><%= item.title%></a></h2>
            </header>
            <p class="meta">
              <time class="time"><i class="glyphicon glyphicon-time"></i> <%= item.time%></time>
              <span class="views"><i class="glyphicon glyphicon-eye-open"></i> 共<%= item.num%>人围观</span>
              <a class="comment" href="article.html#comment"><i class="glyphicon glyphicon-comment"></i> 0个不明物体</a></p>
            <p class="note"><%= item.info%></p>
          </article>
          <% }) %>
          <nav class="pagination" style="display: block;">
            <ul>
              <li class="prev-page"></li>
              <li class="active"><span>1</span></li>
              <li><a href="?page=2">2</a></li>
              <li class="next-page"><a href="?page=2">下一页</a></li>
              <li><span>共 2 页</span></li>
            </ul>
          </nav>
        </div>
      </div>
      <aside class="sidebar">
        <div class="fixed">

          <div class="widget widget-tabs <%- loginUser ? 'hide' : '' %>" id="loginBox">
            <ul class="nav nav-tabs" role="tablist">
              <!-- <li role="presentation" class="active"><a href="#notice" aria-controls="notice" role="tab" data-toggle="tab">网站公告</a></li> -->
              <li role="presentation"><a href="#centre" aria-controls="centre" role="tab" data-toggle="tab">会员中心</a>
              </li>
              <!-- <li role="presentation"><a href="#contact" aria-controls="contact" role="tab" data-toggle="tab">联系站长</a></li> -->
            </ul>
            <div class="tab-content">
              <!-- <div role="tabpanel" class="tab-pane notice active" id="notice">
            <ul>
              <li>
                <time datetime="2016-01-04">01-04</time>
                <a href="" target="_blank">欢迎访问黄绍模博客</a></li>
              <li>
                <time datetime="2016-01-04">01-04</time>
                <a target="_blank" href="">在这里可以看到前端技术，后端程序，网站内容管理系统等文章，还有我的程序人生！</a></li>
              <li>
                <time datetime="2016-01-04">01-04</time>
                <a target="_blank" href="">在这个小工具中最多可以调用五条</a></li>
            </ul>
          </div> -->
              <div role="tabpanel" class="tab-pane centre active" id="centre">
                <h4>需要登录才能进入会员中心</h4>
                <p>
                  <a data-toggle="modal" data-target="#loginModal" class="btn btn-primary">立即登录</a>
                  <a data-toggle="modal" data-target="#regModal" class="btn btn-default">现在注册</a>
                </p>
              </div>
              <!-- <div role="tabpanel" class="tab-pane contact" id="contact">
            <h2>Email:<br />
              <a href="mailto:admin@ylsat.com" data-toggle="tooltip" data-placement="bottom" title="Aa1237841@163.com">Aa1237841@163.com</a></h2>
          </div> -->
            </div>
          </div>
          <div class="widget widget_sentence <%- loginUser ? '' : 'hide' %>" id="widget">
            <h3>每日一句</h3>
            <div class="widget-sentence-content">
              <h4>2019年08月05日星期二</h4>
              <p>Do not let what you cannot do interfere with what you can do.<br />
                别让你不能做的事妨碍到你能做的事。（John Wooden）</p>
            </div>
          </div>
          <div class="widget widget_search">
            <form class="navbar-form" action="/Search" method="post">
              <div class="input-group">
                <input type="text" name="keyword" class="form-control" size="35" placeholder="请输入关键字" maxlength="15"
                  autocomplete="off">
                <span class="input-group-btn">
                  <button class="btn btn-default btn-search" name="search" type="submit">搜索</button>
                </span> </div>
            </form>
          </div>
        </div>
        <!-- 热门文章展示区 -->
        <div class="widget widget_hot">
          <h3>热门文章</h3>
          <ul>
            <% hotData.forEach(item=>{%>
            <li>
              <a href="/news?id=<%= item.id%>">
                <span class="thumbnail">
                  <img class="thumb" src="<%= item.img%>" alt=""  onclick="addNum(`<%= item.id%>`)" >
                </span>
                <span class="text"  onclick="addNum(`<%= item.id%>`)" ><%= item.title%></span>
                <span class="muted"><i class="glyphicon glyphicon-time"></i> <%= item.time%>
                </span>
                <span class="muted"><i class="glyphicon glyphicon-eye-open"></i> <%= item.num%></span>
              </a>
            </li>
            <% }) %>
          </ul>
        </div>
      </aside>
  </section>
  <% include common/footer.html %>
  <!--微信二维码模态框-->
  <div class="modal fade user-select" id="WeChat" tabindex="-1" role="dialog" aria-labelledby="WeChatModalLabel">
    <div class="modal-dialog" role="document" style="margin-top:120px;max-width:280px;">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
              aria-hidden="true">&times;</span></button>
          <h4 class="modal-title" id="WeChatModalLabel" style="cursor:default;">微信扫一扫</h4>
        </div>
        <div class="modal-body" style="text-align:center"> <img src="public/home/images/weixin.jpg" alt=""
            style="cursor:pointer" /> </div>
      </div>
    </div>
  </div>
  <!--该功能正在日以继夜的开发中-->
  <div class="modal fade user-select" id="areDeveloping" tabindex="-1" role="dialog"
    aria-labelledby="areDevelopingModalLabel">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
              aria-hidden="true">&times;</span></button>
          <h4 class="modal-title" id="areDevelopingModalLabel" style="cursor:default;">该功能正在日以继夜的开发中…</h4>
        </div>
        <div class="modal-body"> <img src="public/home/images/baoman/baoman_01.gif" alt="深思熟虑" />
          <p style="padding:15px 15px 15px 100px; position:absolute; top:15px; cursor:default;">
            很抱歉，程序猿正在日以继夜的开发此功能，本程序将会在以后的版本中持续完善！</p>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-primary" data-dismiss="modal">朕已阅</button>
        </div>
      </div>
    </div>
  </div>
  <!--登录模态框-->
  <div class="modal fade user-select modal-style" id="loginModal" tabindex="-1" role="dialog"
    aria-labelledby="loginModalLabel">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <form action="/login" method="post">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="loginModalLabel">登录</h4>
          </div>
          <div class="modal-body">
            <div class="form-group">
              <label for="loginModalUserNmae">用户名</label>
              <input type="text" class="form-control" id="username" name="username" placeholder="请输入用户名" autofocus
                maxlength="15" autocomplete="off" required>
            </div>
            <div class="form-group">
              <label for="loginModalUserPwd">密码</label>
              <input type="password" class="form-control" id="password" name="password" placeholder="请输入密码"
                maxlength="18" autocomplete="off" required>
            </div>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary" id="login_btn">登录</button>
          </div>
        </form>
      </div>
    </div>
  </div>
  <!--注册模态框-->
  <div class="modal fade user-select modal-style" id="regModal" tabindex="-1" role="dialog"
    aria-labelledby="regModalLabel">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <form method="post" class="form-x" action="/reg" enctype="multipart/form-data">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="regModalLabel">注册</h4>
          </div>
          <div class="modal-body">
            <div class="form-group">
              <label for="regModalUserNmae">用户名</label>
              <input type="text" class="form-control" id="regUsername" name="username" placeholder="请输入用户名" autofocus
                maxlength="12" autocomplete="off"
                data-validate="required:请输入用户名,length#>=6:账户名不能小于6位,length#<=12:账户名最多12位" required>
            </div>
            <div class="form-group">
              <label for="regModalUserPwd">密码</label>
              <input type="password" class="form-control" id="regPassword" name="password" placeholder="请输入密码"
                maxlength="18" autocomplete="off" data-validate="required:请输入密码,length#>=8:密码不能小于8位" required>
            </div>
            <div class="form-group">
              <label for="regModalUserPwd">确认密码</label>
              <input type="password" class="form-control" id="regRepassword" name="repassword" placeholder="请再次输入密码"
                maxlength="18" autocomplete="off" data-validate="required:请再次输入密码,repeat#password:两次输入的密码不一致" required>
            </div>
            <div class="modal-footer">
              <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
              <button type="submit" class="btn btn-primary" id="reg_btn" >注册</button>
            </div>
          </div> 
        </form>
      </div>
    </div>
  </div>
  <!--右键菜单列表-->
  <% include common/rightClickMenu.html%>
  <script src="public/home/js/bootstrap.min.js"></script>
  <script src="public/home/js/jquery.ias.js"></script>
  <script src="public/home/js/scripts.js"></script>
  <script src="public/home/js/uploadStyle.js"></script>
  <script>  
      function addNum(newsid){
        $.get("/ajax_num",{id:newsid},function(data){
        })
      }
  </script>
</body>

</html>